function value = subsref(self,index)
%*=+--+=#=+--      UAS Severe Weather Simulation Softeware        --+=#=+--+=#*%
%          Copyright (C) 2013 Regents of the University of Colorado.           %
%                             All Rights Reserved.                             %
%                                                                              %
%    This program is free software: you can redistribute it and/or modify      %
%    it under the terms of the GNU General Public License version 2 as         %
%    published by the Free Software Foundation.                                %
%                                                                              %
%    This program is distributed in the hope that it will be useful,           %
%    but WITHOUT ANY WARRANTY; without even the implied warranty of            %
%    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the             %
%    GNU General Public License for more details.                              %
%                                                                              %
%    You should have received a copy of the GNU General Public License         %
%    along with this program.  If not, see <http://www.gnu.org/licenses/>.     %
%                                                                              %
%           Jack Elston                                                        %
%           elstonj@colorado.edu                                               %
%                                                                              %
%*=+--+=#=+--                 --+=#=+--+=#=+--                    --+=#=+--+=#*%

  value = [];

  switch index.type
    case '()'
    case '.'
      switch index.subs
        case 'position'
          value = self.pos;
        case 'x'
          pos = self.pos;
          value = pos(1);
        case 'y'
          pos = self.pos;
          value = pos(2);
        case 'z'
          pos = self.pos;
          value = pos(3);
        case 'velocity'
          value = self.vel;
        case 'euler'
          value = self.euler;
        case 'input'
          value = self.input;
        case 'vmin'
          value = self.vmin;
        case 'vmax'
          value = self.vmax;
        case 'vmax'
          value = self.vmax;
        case 'turnmax'
          value = self.turnmax;
        case 'log'
          value = self.log;
        case 'flight_computer'
          value = self.flight_computer;
      end
  end
